/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class EtcUser extends BaseModel {
	
	/**
     * 
     */
    private static final long serialVersionUID = -8357411815683254457L;
    //alias
	public static final String TABLE_ALIAS = "EtcUser";
	public static final String ALIAS_USER_ID = "用户id";
	public static final String ALIAS_USER_LOGINNAME = "登录名";
	public static final String ALIAS_USER_LOGINPASS = "登录密码";
	public static final String ALIAS_USER_NAME = "姓名";
	public static final String ALIAS_USER_PHONE = "手机号码";
	public static final String ALIAS_USER_EMAIL = "邮箱";
	public static final String ALIAS_USER_HEADIMG = "头像";
	public static final String ALIAS_USER_SEX = "用户的性别，值为1时是男性，值为2时是女性，值为0时是未知";
	public static final String ALIAS_USER_STATUS = "用户状态:0正常，1锁定";
	public static final String OPENID = "openid";
	public static final String SUBSCRIBE = "是否关注公众号";
	public static final String ALIAS_VERSION = "乐观锁";
	public static final String ALIAS_USER_REMARK = "备注";
	public static final String ALIAS_CREATE_TIME = "创建时间";
	public static final String ALIAS_UPDATE_TIME = "更新时间";
	 
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private java.lang.String user_id;
	private java.lang.String user_loginname;
	private java.lang.String user_loginpass;
	private java.lang.String user_name;
	private java.lang.String user_phone;
	private java.lang.String user_email;
	private java.lang.String user_headimg;
	private java.lang.Integer user_sex;
	private Date birthday;
	private java.lang.Integer user_status;
	private java.lang.String openid;
	private java.lang.String unionid;
	private java.lang.Integer subscribe;
	private java.lang.Integer version;
	private java.lang.String user_remark;
	private java.util.Date create_time;
	private java.util.Date update_time;
	private String nickName;
	private String residentCity;
	//columns END

	public EtcUser(){
	}

	public EtcUser(
		java.lang.String user_id
	){
		this.user_id = user_id;
	}

	public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    
    public String getResidentCity() {
        return residentCity;
    }

    public void setResidentCity(String residentCity) {
        this.residentCity = residentCity;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**  
	 * 设置用户id  
	 * @param user_id 用户id  
	 */  
	public void setUser_id(java.lang.String user_id) {
		this.user_id = user_id;
	}
	
	/**  
	 * 获取用户id   
	 * @return user_id 用户id   
	 */
	public java.lang.String getUser_id() {
		return this.user_id;
	}
	/**  
	 * 设置登录名  
	 * @param user_loginname 登录名  
	 */  
	public void setUser_loginname(java.lang.String user_loginname) {
		this.user_loginname = user_loginname;
	}
	
	/**  
	 * 获取登录名   
	 * @return user_loginname 登录名   
	 */
	public java.lang.String getUser_loginname() {
		return this.user_loginname;
	}
	/**  
	 * 设置登录密码  
	 * @param user_loginpass 登录密码  
	 */  
	public void setUser_loginpass(java.lang.String user_loginpass) {
		this.user_loginpass = user_loginpass;
	}
	
	/**  
	 * 获取登录密码   
	 * @return user_loginpass 登录密码   
	 */
	public java.lang.String getUser_loginpass() {
		return this.user_loginpass;
	}
	/**  
	 * 设置姓名  
	 * @param user_name 姓名  
	 */  
	public void setUser_name(java.lang.String user_name) {
		this.user_name = user_name;
	}
	
	/**  
	 * 获取姓名   
	 * @return user_name 姓名   
	 */
	public java.lang.String getUser_name() {
		return this.user_name;
	}
	/**  
	 * 设置手机号码  
	 * @param user_phone 手机号码  
	 */  
	public void setUser_phone(java.lang.String user_phone) {
		this.user_phone = user_phone;
	}
	
	/**  
	 * 获取手机号码   
	 * @return user_phone 手机号码   
	 */
	public java.lang.String getUser_phone() {
		return this.user_phone;
	}
	/**  
	 * 设置邮箱  
	 * @param user_email 邮箱  
	 */  
	public void setUser_email(java.lang.String user_email) {
		this.user_email = user_email;
	}
	
	/**  
	 * 获取邮箱   
	 * @return user_email 邮箱   
	 */
	public java.lang.String getUser_email() {
		return this.user_email;
	}
	/**  
	 * 设置头像  
	 * @param user_headimg 头像  
	 */  
	public void setUser_headimg(java.lang.String user_headimg) {
		this.user_headimg = user_headimg;
	}
	
	/**  
	 * 获取头像   
	 * @return user_headimg 头像   
	 */
	public java.lang.String getUser_headimg() {
		return this.user_headimg;
	}
	/**  
	 * 设置用户的性别，值为1时是男性，值为2时是女性，值为0时是未知  
	 * @param user_sex 用户的性别，值为1时是男性，值为2时是女性，值为0时是未知  
	 */  
	public void setUser_sex(java.lang.Integer user_sex) {
		this.user_sex = user_sex;
	}
	
	/**  
	 * 获取用户的性别，值为1时是男性，值为2时是女性，值为0时是未知   
	 * @return user_sex 用户的性别，值为1时是男性，值为2时是女性，值为0时是未知   
	 */
	public java.lang.Integer getUser_sex() {
		return this.user_sex;
	}
	/**  
	 * 设置用户状态:0正常，1锁定  
	 * @param user_status 用户状态:0正常，1锁定  
	 */  
	public void setUser_status(java.lang.Integer user_status) {
		this.user_status = user_status;
	}
	
	/**  
	 * 获取用户状态:0正常，1锁定   
	 * @return user_status 用户状态:0正常，1锁定   
	 */
	public java.lang.Integer getUser_status() {
		return this.user_status;
	}
	/**  
	 * 设置乐观锁  
	 * @param version 乐观锁  
	 */  
	public void setVersion(java.lang.Integer version) {
		this.version = version;
	}
	
	/**  
	 * 获取乐观锁   
	 * @return version 乐观锁   
	 */
	public java.lang.Integer getVersion() {
		return this.version;
	}
	/**  
	 * 设置备注  
	 * @param user_remark 备注  
	 */  
	public void setUser_remark(java.lang.String user_remark) {
		this.user_remark = user_remark;
	}
	
	/**  
	 * 获取备注   
	 * @return user_remark 备注   
	 */
	public java.lang.String getUser_remark() {
		return this.user_remark;
	}
	/**  
	 * 设置创建时间  
	 * @param create_time 创建时间  
	 */  
	public void setCreate_time(java.util.Date create_time) {
		this.create_time = create_time;
	}
	
	/**  
	 * 获取创建时间   
	 * @return create_time 创建时间   
	 */
	public java.util.Date getCreate_time() {
		return this.create_time;
	}
	/**  
	 * 设置更新时间  
	 * @param update_time 更新时间  
	 */  
	public void setUpdate_time(java.util.Date update_time) {
		this.update_time = update_time;
	}
	
	/**  
	 * 获取更新时间   
	 * @return update_time 更新时间   
	 */
	public java.util.Date getUpdate_time() {
		return this.update_time;
	}
	
	private Set etcApplys = new HashSet(0);
	public void setEtcApplys(Set<EtcApply> etcApply){
		this.etcApplys = etcApply;
	}
	
	public Set<EtcApply> getEtcApplys() {
		return etcApplys;
	}
	
	private Set etcAddressbooks = new HashSet(0);
	public void setEtcAddressbooks(Set<EtcAddressbook> etcAddressbook){
		this.etcAddressbooks = etcAddressbook;
	}
	
	public Set<EtcAddressbook> getEtcAddressbooks() {
		return etcAddressbooks;
	}
	
	private Set etcCars = new HashSet(0);
	public void setEtcCars(Set<EtcCar> etcCar){
		this.etcCars = etcCar;
	}
	
	public Set<EtcCar> getEtcCars() {
		return etcCars;
	}

	public java.lang.String getOpenid() {
        return openid;
    }

    public void setOpenid(java.lang.String openid) {
        this.openid = openid;
    }

    public java.lang.Integer getSubscribe() {
        return subscribe;
    }

    public void setSubscribe(java.lang.Integer subscribe) {
        this.subscribe = subscribe;
    }
    
    public java.lang.String getUnionid() {
        return unionid;
    }

    public void setUnionid(java.lang.String unionid) {
        this.unionid = unionid;
    }

    @Override
    public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("user_id",getUser_id())
			.append("user_loginname",getUser_loginname())
			.append("user_loginpass",getUser_loginpass())
			.append("user_name",getUser_name())
			.append("user_phone",getUser_phone())
			.append("user_email",getUser_email())
			.append("user_headimg",getUser_headimg())
			.append("user_sex",getUser_sex())
			.append("user_status",getUser_status())
			.append("version",getVersion())
			.append("user_remark",getUser_remark())
			.append("create_time",getCreate_time())
			.append("update_time",getUpdate_time())
			.toString();
	}
	
	@Override
    public int hashCode() {
		return new HashCodeBuilder()
			.append(getUser_id())
			.toHashCode();
	}
	
	@Override
    public boolean equals(Object obj) {
		if(obj instanceof EtcUser == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		EtcUser other = (EtcUser)obj;
		return new EqualsBuilder()
			.append(getUser_id(),other.getUser_id())
			.isEquals();
	}
}

